#include <stdio.h>
#include <math.h>
float solution(float a, float b, float c, float d)
{
	float x, x0, y, yd, h;
	x = 0;
	for (x0 = 1.5; fabs(x - x0) >= 1e-5;)
	{
		x = x0;
		y = a * x * x * x + b * x * x + c * x + d;
		yd = 3 * a * x * x + 2 * b * x + c;
		h = y / yd;
		x0 = x - h;
	}
	return (x0);
	

}
int main()
{
	float a, b, c, d;
	scanf_s("%f,%f,%f,%f", &a, &b, &c, &d);
	float e;
	e = solution(a, b, c, d);
	printf("%f", e);
	return 0;
}